package networking;

import java.io.File;

import translators.cocoa.CocoaTranslator;
import ecologylab.serialization.TranslationScope;

public class main {

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	  {

	    /*
	     * We create an instance of CocaTranslator which will translate
	     * our annotated java source code to Objective-C header file.
	     */
	    CocoaTranslator c = new CocoaTranslator();
	    
	    /*
	     * We create an object of Translation scope of all the java files for which,
	     * We need to create the Translation Scope XML file.
	     */
	    TranslationScope tScope  = ChatTranslations.get();
	    try 
	    {
	      /*
	       * Call translateToObjC supplied with the path where we want our header files 
	       * to be generated
	       */
	      c.translateToObjC(new File ("/NetOutput"), tScope);
	      
	      /*
	       * Call serialize will serialize the internal data structures of 
	       * s.im.pl serialization which should be used by objective-c version s.im.pl serialization
	       */
	      tScope.serialize(new File("/NetOutput/ChatTranslations_translationScope.xml"));
	    } 
	    catch (Exception e)
	    {
	      e.printStackTrace();
	    }
	  }

}
